/*
 * Copyright：fxsen <br/>
 * Date: 2022/1/19 17:17 <br/>
 * Email:fxsen@foxmail.com
 * Author: fxsen
 */
package com.fxsen.commons.sysmanager.core.mapper;

import com.fxsen.commons.core.base.common.mapper.CommonMapper;
import com.fxsen.commons.sysmanager.core.entity.MenuRole;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @describe: 角色菜单持久层
 * @date: 2022/1/19 17:17
 * @author: fxsen
 */
@Mapper
@Repository
public interface MenuRoleMapper extends CommonMapper<MenuRole> {
    /**
    * 通过角色查询菜单
    * @param roleId 角色id
    * @return {@link List}
    * @date 2022/1/20 10:25
    * @author fxsen
    **/
    List<MenuRole> findByRoleId(String roleId);
    /**
     * 通过角色和菜单查询
     * @param roleId 角色id
     * @param menuId 菜单id
     * @return {@link MenuRole}
     * @date 2022/1/23 21:36
     * @author fxsen
     **/
    MenuRole findByRoleIdAndMenuId(String roleId, String menuId);
}
